#extension GL_OES_EGL_image_external : require
precision mediump float;
varying vec2 textureCoordinate;
uniform samplerExternalOES s_texture;
void main() {
     lowp vec4 textureColor=texture2D( s_texture, textureCoordinate );
    float gray = textureColor.r * 0.299 + textureColor.g * 0.587 + textureColor.b * 0.114;
     gl_FragColor = vec4(gray, gray, gray, textureColor.w);
    
}